From b62c5520a00b80791f9f917acbf8e24969fd0e24 Mon Sep 17 00:00:00 2001 From: alexmot Date: Fri, 11 Nov 2005 20:44:20 +0000 Subject: [PATCH] correct zero NMEA lat/lon on input --- csv_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csv_util.c b/csv_util.c index 6bfbfc786..a4e78e759 100644 --- a/csv_util.c +++ b/csv_util.c @@ -802,7 +802,7 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp) human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 ); } else if ( strcmp(fmp->key, "LAT_NMEA") == 0) { - wpt->latitude = ddmm2degrees(wpt->latitude); + wpt->latitude = ddmm2degrees(atof(s)); } else /* LONGITUDE CONVERSIONS ***********************************************/ if (strcmp(fmp->key, "LON_DECIMAL") == 0) { @@ -822,7 +822,7 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp) human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 ); } else if ( strcmp(fmp->key, "LON_NMEA") == 0) { - wpt->latitude = ddmm2degrees(wpt->longitude); + wpt->longitude = ddmm2degrees(atof(s)); } else /* LAT AND LON CONVERSIONS ********************************************/ if ( strcmp(fmp->key, "LATLON_HUMAN_READABLE") == 0) { -- 2.30.2